namespace Kjlib
{
	using System;
	using System.Web.UI;
	using System.Collections.Specialized;
	using System.Web;

	public class PageUtil
	{
		public static void printArgs(Page pg)
		{
			NameValueCollection coll;

			if (pg.Request.HttpMethod == "GET")
				coll = pg.Request.QueryString;
			else if (pg.Request.HttpMethod == "POST")
				coll = pg.Request.Form;
			else
				throw new Exception("Unknown HttpMethod Type");
			
			pg.Response.Write(pg.Request.HttpMethod + "<br>");

			foreach(string key in coll.Keys)
				pg.Response.Write(key + ":" + coll[key] + "<br>");
		}
	};
}
